<?php
namespace app\adminmall\controller;
use app\adminmall\model\ScorecModel;
use app\adminmall\model\MemberModel;
use app\common\controller\AdminBaseController;
use think\Db;
   
/**
 * 余额积分
 * @author [lx] 
 */
class ScorecController extends AdminBaseController
{
 	 protected $Scorecmodel;
 	 protected $Membermodel;
	
    protected function _initialize() {
        parent::_initialize();
       $this->model = new ScorecModel();
         $this->model = new MemberModel();
        
    }
    /**
     * 帮助中心列表
     * @author [lx] 
     */
    public function index( $page = 1){
    	
        //商家积分
        $scoresum = Db::name("mall_agent")->sum('score');
        $this->assign('scoresum',$scoresum);
        //商家金额
        
        $moneysum = Db::name("mall_agent")->sum('store_balance');
       
        $this->assign('moneysum',$moneysum);
        
       
        
        
        //会员积分
        $scoresumuser = Db::name("member")->sum('credit2');
        
        $this->assign('scoresumuser',$scoresumuser);
        //会员金额
        $moneysumuser = Db::name("member")->sum('credit1');
        $this->assign('moneysumuser',$moneysumuser);
        return $this->fetch();
    }}